package com.yzq.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yzq.model.dto.likes.LikesRequest;
import com.yzq.model.entity.Likes;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;

/**
* @author yezhi
* @description 针对表【likes(点赞表)】的数据库操作Service
* @createDate 2025-07-07 14:27:55
*/
public interface LikesService extends IService<Likes> {
    /**
     * 点赞图片
     * @param likesRequest 点赞请求
     * @param request 请求
     * @return 点赞结果
     */
    Boolean likePicture(LikesRequest likesRequest, HttpServletRequest request);

    /**
     * 取消点赞图片
     * @param likesRequest 点赞请求
     * @param request 请求
     * @return 取消点赞结果
     */
    Boolean cancelLikePicture(LikesRequest likesRequest, HttpServletRequest request);

    /**
     * 判断用户是否点赞图片
     * @param likeQueryWrapper 查询条件
     * @return 是否点赞
     */
    Boolean isLike(QueryWrapper<Likes> likeQueryWrapper);
}
